package com.yh.correct.service;

import java.util.List;
import java.util.Map;

import com.github.pagehelper.PageInfo;
import com.yh.correct.model.ActiveUser;
import com.yh.correct.model.SysPermission;
import com.yh.correct.model.SysUser;
import com.yh.correct.model.SysUserRole;

/**
 * 系统用户service层接口
 * @author Administrator
 *
 */
public interface ISysUserService {
	/**
	 * 获取单个用户信息
	 * @param user
	 * @return
	 * @throws Exception
	 */
	Map<String,Object> getSysUser(SysUser user) throws Exception;
	/**
	 * 增加用户
	 * @param user
	 * @return
	 * @throws Exception
	 */
	int insertSysUser(SysUser user,Integer roleid) throws Exception;
	/**
	 * 删除用户
	 * @param user
	 * @return
	 * @throws Exception
	 */
	int deleteSysUser(SysUser user) throws Exception;
	/**
	 * 更新用户
	 * @param user
	 * @return
	 * @throws Exception
	 */
	int updateSysUser(SysUser user,SysUserRole userrole) throws Exception;
	/**
	 * 修改用户密码
	 * @param user
	 * @return
	 * @throws Exception
	 */
	int updateSysUserPwd(SysUser user) throws Exception;
	/**
	 * 动态条件查询用户分页
	 * @param condition
	 * @return
	 * @throws Exception
	 */
	PageInfo<Object> findListByCondition(Map<String,Object> condition) throws Exception;
	/**
	 * 根据用户账号查询用户信息
	 * @param username
	 * @return
	 * @throws Exception
	 */
	SysUser findSysUserByUsername(String username)throws Exception;
	/**
	 * 根据用户id查询权限范围的菜单
	 * @param id
	 * @return
	 * @throws Exception
	 */
	List<SysPermission> findMenuListById(int id) throws Exception;
	/**
	 * 根据用户id查询权限范围的url
	 * @param id
	 * @return
	 * @throws Exception
	 */
	List<SysPermission> findPermissionListById(int id) throws Exception;

	/**
	 * 查找所有用户
	 * @return
	 * @throws Exception
     */
	List<SysUser> getAllUser() throws Exception;
}
